import sys

from cx_Freeze import setup, Executable

base = None
if sys.platform == "win32":
    base = "Win32GUI"

version = "1.1.1"
executables = [
        Executable("PyProxySwitch/src/PyProxySwitch.pyw", base = base),
        Executable("PyProxySwitch/src/pps_config.py", base = 'Console')
]
buildOptions = dict(
		build_exe = 'PyProxySwitch-win-%s/bin' % version,
        compressed = True,
        optimize = 1,
        #'copy_dependent_files'="False",
        append_script_to_exe=True,
        create_shared_zip=False,
        #'include_in_shared_zip'="True",
        path = sys.path.append('./PyProxySwitch/src'),
        #bin-excludes = [],
        includes = ['pyetc'],
        excludes = ['_ctypes', 'socket', 'ssl', 'bz2', 'select'],
        include_files = [
        #('pyetc.py', 'src/pyetc.py'), ('PyProxySwitch.pyw','src/PyProxySwitch.pyw'),
        #('batch_add_proxy.bat', 'src/batch_add_proxy.bat'),('proxy.txt', 'src/proxy.txt') , 
        #('PyProxySwitch.ico','src/PyProxySwitch.ico'), ('pps_config.py', 'src/pps_config.py'),
        ('PyProxySwitch/src', '../src'), ('PyProxySwitch/bin', '../bin'),('PyProxySwitch/cfg', '../cfg'), 
        ('PyProxySwitch/licenses', '../licenses'), ('PyProxySwitch/README_CN.txt', '../README_CN.txt'),
        ('PyProxySwitch/README_EN.txt', '../README_EN.txt')],
        icon = 'PyProxySwitch/src/PyProxySwitch.ico',

        )

setup(
        name = "PyProxySwitch",
        version = version,
        description = "A fast proxy switcher",
        options = dict(build_exe = buildOptions),
        executables = executables,        
     )

